<!DOCTYPE html>


<html lang="zh-CN">


<head>
  <meta charset="utf-8" />
    
  <meta name="description" content="welcome" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>
     ChenyyのBlog
  </title>
  <meta name="generator" content="hexo-theme-ayer">
  
  <link rel="shortcut icon" href="/favicon.ico" />
  
  
<link rel="stylesheet" href="/dist/main.css">

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/css/remixicon.min.css">
  
<link rel="stylesheet" href="/css/custom.css">

  
  <script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
  
  

  

</head>

</html>

<body>
  <div id="app">
    
      
    <main class="content on">
      
<section class="cover">
    
      
      <a class="forkMe" href="https://github.com/Shen-Yu/hexo-theme-ayer"
        target="_blank"><img width="149" height="149" src="/images/forkme.png"
          class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
    
  <div class="cover-frame">
    <div class="bg-box">
      <img src="/images/cover1.jpg" alt="image frame" />
    </div>
    <div class="cover-inner text-center text-white">
      <h1><a href="/">ChenyyのBlog</a></h1>
      <div id="subtitle-box">
        
        <span id="subtitle"></span>
        
      </div>
      <div>
        
      </div>
    </div>
  </div>
  <div class="cover-learn-more">
    <a href="javascript:void(0)" class="anchor"><i class="ri-arrow-down-line"></i></a>
  </div>
</section>



<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js"></script>


<!-- Subtitle -->

  <script>
    try {
      var typed = new Typed("#subtitle", {
        strings: ['多读书 多看报 少吃零食 多睡觉~', '身体和灵魂总有一个要在路上...', '心理已经够变态了 身体一定要健康啊！'],
        startDelay: 0,
        typeSpeed: 200,
        loop: true,
        backSpeed: 100,
        showCursor: true
      });
    } catch (err) {
      console.log(err)
    }
  </script>
  
<div id="main">
  <section class="outer">
  
  
  <article class="articles">
    
    
    
    
    <article
  id="post-network/为什么tcp建立连接需要三次握手，断开连接需要四次挥手"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/04/14/network/%E4%B8%BA%E4%BB%80%E4%B9%88tcp%E5%BB%BA%E7%AB%8B%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%EF%BC%8C%E6%96%AD%E5%BC%80%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E5%9B%9B%E6%AC%A1%E6%8C%A5%E6%89%8B/"
    >为什么tcp建立连接需要三次握手，断开连接需要四次挥手</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/04/14/network/%E4%B8%BA%E4%BB%80%E4%B9%88tcp%E5%BB%BA%E7%AB%8B%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%EF%BC%8C%E6%96%AD%E5%BC%80%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E5%9B%9B%E6%AC%A1%E6%8C%A5%E6%89%8B/" class="article-date">
  <time datetime="2021-04-14T12:21:58.000Z" itemprop="datePublished">2021-04-14</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%BD%91%E7%BB%9C/">网络</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>三次握手</li>
<li>四次挥手</li>
</ul> 
      <a class="article-more-link" href="/2021/04/14/network/%E4%B8%BA%E4%BB%80%E4%B9%88tcp%E5%BB%BA%E7%AB%8B%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%EF%BC%8C%E6%96%AD%E5%BC%80%E8%BF%9E%E6%8E%A5%E9%9C%80%E8%A6%81%E5%9B%9B%E6%AC%A1%E6%8C%A5%E6%89%8B/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E7%BD%91%E7%BB%9C/" rel="tag">网络</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（十二）哨兵集群部署"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/03/16/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%BA%8C%EF%BC%89%E5%93%A8%E5%85%B5%E9%9B%86%E7%BE%A4%E9%83%A8%E7%BD%B2/"
    >电商详情页缓存架构（十二）哨兵集群部署</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/03/16/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%BA%8C%EF%BC%89%E5%93%A8%E5%85%B5%E9%9B%86%E7%BE%A4%E9%83%A8%E7%BD%B2/" class="article-date">
  <time datetime="2021-03-16T13:21:58.000Z" itemprop="datePublished">2021-03-16</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>哨兵的配置文件</li>
<li>sentinel 配置</li>
<li>启动哨兵进程</li>
</ul> 
      <a class="article-more-link" href="/2021/03/16/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%BA%8C%EF%BC%89%E5%93%A8%E5%85%B5%E9%9B%86%E7%BE%A4%E9%83%A8%E7%BD%B2/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（十一）哨兵架构介绍"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/03/11/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%B8%80%EF%BC%89%E5%93%A8%E5%85%B5%E6%9E%B6%E6%9E%84%E4%BB%8B%E7%BB%8D/"
    >电商详情页缓存架构（十一）哨兵架构介绍</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/03/11/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%B8%80%EF%BC%89%E5%93%A8%E5%85%B5%E6%9E%B6%E6%9E%84%E4%BB%8B%E7%BB%8D/" class="article-date">
  <time datetime="2021-03-11T13:21:58.000Z" itemprop="datePublished">2021-03-11</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>部署 slave node</li>
<li>主从架构的高可用</li>
<li>sentinal 哨兵的介绍</li>
<li>哨兵主备切换的数据丢失问题</li>
<li>哨兵核心底层原理的深入解析</li>
</ul> 
      <a class="article-more-link" href="/2021/03/11/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%E4%B8%80%EF%BC%89%E5%93%A8%E5%85%B5%E6%9E%B6%E6%9E%84%E4%BB%8B%E7%BB%8D/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（十）redis主从复制架构部署"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/03/07/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E6%9E%B6%E6%9E%84%E9%83%A8%E7%BD%B2/"
    >电商详情页缓存架构（十）redis主从复制架构部署</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/03/07/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E6%9E%B6%E6%9E%84%E9%83%A8%E7%BD%B2/" class="article-date">
  <time datetime="2021-03-07T13:21:58.000Z" itemprop="datePublished">2021-03-07</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>部署 slave node</li>
<li>强制读写分离</li>
<li>集群安全认证</li>
<li>读写分离架构的测试</li>
</ul> 
      <a class="article-more-link" href="/2021/03/07/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%8D%81%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E6%9E%B6%E6%9E%84%E9%83%A8%E7%BD%B2/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（九）redis主从复制原理"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/03/04/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B9%9D%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E5%8E%9F%E7%90%86/"
    >电商详情页缓存架构（九）redis主从复制原理</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/03/04/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B9%9D%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E5%8E%9F%E7%90%86/" class="article-date">
  <time datetime="2021-03-04T13:21:58.000Z" itemprop="datePublished">2021-03-04</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>主从架构的核心原理</li>
<li>redis replication复制流程</li>
<li>全量复制</li>
<li>增量复制</li>
<li>redis replication 的核心机制</li>
<li>数据同步相关的核心机制</li>
</ul> 
      <a class="article-more-link" href="/2021/03/04/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B9%9D%EF%BC%89redis%E4%B8%BB%E4%BB%8E%E5%A4%8D%E5%88%B6%E5%8E%9F%E7%90%86/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（八）redis读写分离"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/03/01/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AB%EF%BC%89redis%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB/"
    >电商详情页缓存架构（八）redis读写分离</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/03/01/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AB%EF%BC%89redis%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB/" class="article-date">
  <time datetime="2021-03-01T13:21:58.000Z" itemprop="datePublished">2021-03-01</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>读写分离</li>
</ul> 
      <a class="article-more-link" href="/2021/03/01/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AB%EF%BC%89redis%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（七）redis数据备份和恢复方案"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/02/26/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B8%83%EF%BC%89redis%E6%95%B0%E6%8D%AE%E5%A4%87%E4%BB%BD%E5%92%8C%E6%81%A2%E5%A4%8D%E6%96%B9%E6%A1%88/"
    >电商详情页缓存架构（七）redis数据备份和恢复方案</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/02/26/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B8%83%EF%BC%89redis%E6%95%B0%E6%8D%AE%E5%A4%87%E4%BB%BD%E5%92%8C%E6%81%A2%E5%A4%8D%E6%96%B9%E6%A1%88/" class="article-date">
  <time datetime="2021-02-26T13:21:58.000Z" itemprop="datePublished">2021-02-26</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>数据备份方案</li>
<li>数据恢复方案</li>
</ul> 
      <a class="article-more-link" href="/2021/02/26/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%B8%83%EF%BC%89redis%E6%95%B0%E6%8D%AE%E5%A4%87%E4%BB%BD%E5%92%8C%E6%81%A2%E5%A4%8D%E6%96%B9%E6%A1%88/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（六）redis持久化配置"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/02/23/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AD%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E9%85%8D%E7%BD%AE/"
    >电商详情页缓存架构（六）redis持久化配置</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/02/23/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AD%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E9%85%8D%E7%BD%AE/" class="article-date">
  <time datetime="2021-02-23T13:21:58.000Z" itemprop="datePublished">2021-02-23</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>RDB配置</p>
<ul>
<li>如何配置RDB持久化机制</li>
<li>RDB持久化机制工作流程</li>
<li>基于RDB持久化机制的数据恢复实验</li>
</ul>
<p>AOF配置</p>
<ul>
<li>如何配置AOF持久化机制</li>
<li>AOF持久化的数据恢复实验</li>
<li>AOF rewrite</li>
<li>AOF破损文件的修复</li>
</ul>
<p>AOF和RDB同时工作</p> 
      <a class="article-more-link" href="/2021/02/23/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%85%AD%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E9%85%8D%E7%BD%AE/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（五）redis两种持久化方式对比和选择"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/02/20/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%BA%94%EF%BC%89redis%E4%B8%A4%E7%A7%8D%E6%8C%81%E4%B9%85%E5%8C%96%E6%96%B9%E5%BC%8F%E5%AF%B9%E6%AF%94%E5%92%8C%E9%80%89%E6%8B%A9/"
    >电商详情页缓存架构（五）redis持久化机制对比和选择</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/02/20/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%BA%94%EF%BC%89redis%E4%B8%A4%E7%A7%8D%E6%8C%81%E4%B9%85%E5%8C%96%E6%96%B9%E5%BC%8F%E5%AF%B9%E6%AF%94%E5%92%8C%E9%80%89%E6%8B%A9/" class="article-date">
  <time datetime="2021-02-20T13:21:58.000Z" itemprop="datePublished">2021-02-20</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>RDB持久化机制优点</li>
<li>RDB持久化机制缺点</li>
<li>AOF持久化机制优点</li>
<li>AOF持久化机制缺点</li>
<li>持久化方式选择</li>
</ul> 
      <a class="article-more-link" href="/2021/02/20/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E4%BA%94%EF%BC%89redis%E4%B8%A4%E7%A7%8D%E6%8C%81%E4%B9%85%E5%8C%96%E6%96%B9%E5%BC%8F%E5%AF%B9%E6%AF%94%E5%92%8C%E9%80%89%E6%8B%A9/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
    <article
  id="post-cache/电商详情页缓存架构（四）redis持久化机制的原理介绍"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2021/02/18/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%9B%9B%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E6%9C%BA%E5%88%B6%E7%9A%84%E5%8E%9F%E7%90%86%E4%BB%8B%E7%BB%8D/"
    >电商详情页缓存架构（四）redis持久化机制的原理介绍</a> 
</h2>
 

    </header>
     
    <div class="article-meta">
      <a href="/2021/02/18/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%9B%9B%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E6%9C%BA%E5%88%B6%E7%9A%84%E5%8E%9F%E7%90%86%E4%BB%8B%E7%BB%8D/" class="article-date">
  <time datetime="2021-02-18T14:21:58.000Z" itemprop="datePublished">2021-02-18</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/cache/">cache</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <ul>
<li>持久化的意义</li>
<li>RDB</li>
<li>AOF</li>
</ul> 
      <a class="article-more-link" href="/2021/02/18/cache/%E7%94%B5%E5%95%86%E8%AF%A6%E6%83%85%E9%A1%B5%E7%BC%93%E5%AD%98%E6%9E%B6%E6%9E%84%EF%BC%88%E5%9B%9B%EF%BC%89redis%E6%8C%81%E4%B9%85%E5%8C%96%E6%9C%BA%E5%88%B6%E7%9A%84%E5%8E%9F%E7%90%86%E4%BB%8B%E7%BB%8D/"
        >阅读更多...</a
      >
       
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/cache/" rel="tag">cache</a></li></ul>

    </footer>
  </div>

    
 
    
</article>

    
  </article>
  

  
  <nav class="page-nav">
    
    <a class="extend prev" rel="prev" href="/page/5/">上一页</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/4/">4</a><a class="page-number" href="/page/5/">5</a><span class="page-number current">6</span><a class="page-number" href="/page/7/">7</a><a class="extend next" rel="next" href="/page/7/">下一页</a>
  </nav>
  
</section>
</div>

      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2021
        <i class="ri-heart-fill heart_icon"></i> Chenyy
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>访问人数:<span id="busuanzi_value_site_uv"></span></s>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>浏览次数:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>
      <div class="float_btns">
        <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

<div class="todark" id="todark">
  <i class="ri-moon-line"></i>
</div>

      </div>
    </main>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="ChenyyのBlog"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">文章</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/book">收藏</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/about/me">关于我</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="搜索">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <script>
      if (window.matchMedia("(max-width: 768px)").matches) {
        document.querySelector('.content').classList.remove('on');
        document.querySelector('.sidebar').classList.remove('on');
      }
    </script>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    
  </div>
</div>
    
<script src="/js/jquery-2.0.3.min.js"></script>


<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->

<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->

<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css">
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script>

<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->


<script src="/js/busuanzi-2.3.pure.min.js"></script>


<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->


<link rel="stylesheet" href="/css/clipboard.css">

<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>


<!-- CanvasBackground -->


    
  </div>
</body>

</html>